/*
 * This program is free software; you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 3 of the License, or 
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 * for more details.
 * 
 * You should have received a copy of the GNU General Public License along 
 * with this program; if not, write to the Free Software Foundation, Inc., 
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef WISHMASTER_HTTPREQUEST_H
#define WISHMASTER_HTTPREQUEST_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include <QHttp>
#include <QSharedPointer>
#include <QNetworkReply>
#include "misc.h"

namespace Wishmaster
{
	class HttpConnector;
	class Request;
	typedef QSharedPointer<Request> RequestPtr;
	class WISHMASTER_EXPORT Request : public QObject
	{
		Q_OBJECT
	public:
		Request();
		virtual ~Request();

		int id() const;

		virtual void perform() = 0;
		virtual bool error() = 0;

		virtual QString contentType() const = 0;

	public slots:
		virtual void cancel() = 0;
		
	private:
		int m_id;
		static int CurrentId;
	};
}

#endif
